package wms.dao.store;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import wms.dao.BaseMapper;
import wms.entity.StoreSet;

public interface StoreSetMapper extends BaseMapper<StoreSet>{
	
	
	boolean txDeleteStoreSet(@Param("goodsCode") String goodsCode, @Param("repoCode") String repoCode) throws Exception;
	
	
	/**
	 * 动态sql 查询库存
	 * @param goodsCode
	 * @param repoCode
	 * @param goodsName
	 * @param goodsType
	 * @param start 
	 * @param end
	 * @return
	 * @throws Exception
	 */
	List<StoreSet> listAllStoreSet(
			@Param("goodsCode")String goodsCode, @Param("goodsName")String goodsName, @Param("goodsType")Integer goodsType,
			@Param("repoCode")String repoCode, @Param("startDate")Date startDate, @Param("endDate")Date endDate,
			@Param("startPage") Integer startPage, @Param("pageSize") Integer pageSize) throws Exception;
	
	
	/**
	 * 获取某个库存信息
	 * @param goodsCode
	 * @param repoCode
	 * @return
	 * @throws Exception
	 */
	StoreSet getStoreSet(@Param("goodsCode")String goodsCode, @Param("repoCode")String repoCode) throws Exception;
	
	
	/**
	 * 获取库存的总记录数
	 * @param goodsCode
	 * @param goodsName
	 * @param goodsType
	 * @param repoCode
	 * @param startDate
	 * @param endDate
	 * @return
	 * @throws Exception
	 */
	int getTotalCount(@Param("goodsCode")String goodsCode, @Param("goodsName")String goodsName, @Param("goodsType")Integer goodsType,
			@Param("repoCode")String repoCode, @Param("startDate")Date startDate, @Param("endDate")Date endDate) throws Exception;

	
	
	
	/**
	 * 批量导入库存
	 * @param list
	 * @return
	 */
	boolean saveStoreSetWithBatch(List<StoreSet> list) throws Exception;
















}
